import React, { Component } from 'react'
import { CloseOutlined} from '@ant-design/icons';

export default class Tanchu extends React.Component {

    render(){
      return(<div className='taochu'>
      {this.props.bianjia==0? <span>添加</span>:<span>编辑</span>}
     <i className="ziji" onClick={this.props.guanbi}><CloseOutlined /></i>
     <div className="shuru">
     &nbsp;&nbsp;&nbsp;Name:   
     <input type='text' name='name' value={this.props.name} className="biandan xia" onChange={(e)=>{
       this.props.ongaibian(e.target)
     }}/>
     </div>
     <div>
     Address:
     <input type='text' name='address' value={this.props.address}  className="biandan xia" onChange={(e)=>{
       this.props.ongaibian(e.target)
     }}/>
     </div>
     <div>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Age:
     <input type='text' name='age' value={this.props.age}  className="biandan2" onChange={(e)=>{
       this.props.ongaibian(e.target)}}/>
     </div>
     <div className="di"> 
     <button className="anniu yanse1" onClick={this.props.guanbi}>取消</button>
     <button className="anniu yanse2" onClick={this.props.tianjia}>确定</button>    
     </div>
 
    </div>)
    }
 }